{"ast":null,"code":"import React from\"react\";import{Button as BaseButton}from'@mui/material';import classNames from\"classnames\";import styles from\"./Button.module.scss\";import{jsx as _jsx}from\"react/jsx-runtime\";var Button=function Button(_ref){var text=_ref.text,_ref$fullWidth=_ref.fullWidth,fullWidth=_ref$fullWidth===void 0?true:_ref$fullWidth,callback=_ref.callback,_ref$customClassName=_ref.customClassName,customClassName=_ref$customClassName===void 0?'':_ref$customClassName,_ref$disable=_ref.disable,disable=_ref$disable===void 0?false:_ref$disable;if(callback){return/*#__PURE__*/_jsx(BaseButton,{type:\"submit\",variant:\"contained\",fullWidth:fullWidth,onClick:callback,disableElevation:true,className:classNames(styles.btn,customClassName),disabled:disable,children:text});}else{return/*#__PURE__*/_jsx(BaseButton,{type:\"submit\",variant:\"contained\",fullWidth:fullWidth,disableElevation:true,className:classNames(styles.btn,customClassName),disabled:disable,children:text});}};export default Button;","map":{"version":3,"names":["React","Button","BaseButton","classNames","styles","text","fullWidth","callback","customClassName","disable","btn"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/src/components/Button/index.tsx"],"sourcesContent":["import React from \"react\";\nimport {ButtonProps} from \"../../models/props/ButtonProps\";\nimport {Button as BaseButton} from '@mui/material';\nimport classNames from \"classnames\";\nimport styles from \"./Button.module.scss\";\n\nconst Button: React.FC<ButtonProps> = ({text, fullWidth = true, callback, customClassName = '', disable = false}) => {\n    if (callback!) {\n        return (\n            <BaseButton\n                type=\"submit\"\n                variant=\"contained\"\n                fullWidth={fullWidth}\n                onClick={callback}\n                disableElevation={true}\n                className={classNames(styles.btn, customClassName)}\n                disabled={disable}\n            >\n                {text}\n            </BaseButton>\n        );\n    } else {\n        return (\n            <BaseButton\n                type=\"submit\"\n                variant=\"contained\"\n                fullWidth={fullWidth}\n                disableElevation={true}\n                className={classNames(styles.btn, customClassName)}\n                disabled={disable}\n            >\n                {text}\n            </BaseButton>\n        );\n    }\n}\n\nexport default Button;\n"],"mappings":"AAAA,MAAOA,MAAK,KAAM,OAAO,CAEzB,OAAQC,MAAM,GAAIC,WAAU,KAAO,eAAe,CAClD,MAAOC,WAAU,KAAM,YAAY,CACnC,MAAOC,OAAM,KAAM,sBAAsB,CAAC,2CAE1C,GAAMH,OAA6B,CAAG,QAAhCA,OAA6B,MAAkF,IAA7EI,KAAI,MAAJA,IAAI,qBAAEC,SAAS,CAATA,SAAS,yBAAG,IAAI,gBAAEC,QAAQ,MAARA,QAAQ,2BAAEC,eAAe,CAAfA,eAAe,+BAAG,EAAE,wCAAEC,OAAO,CAAPA,OAAO,uBAAG,KAAK,cAC3G,GAAIF,QAAQ,CAAG,CACX,mBACI,KAAC,UAAU,EACP,IAAI,CAAC,QAAQ,CACb,OAAO,CAAC,WAAW,CACnB,SAAS,CAAED,SAAU,CACrB,OAAO,CAAEC,QAAS,CAClB,gBAAgB,CAAE,IAAK,CACvB,SAAS,CAAEJ,UAAU,CAACC,MAAM,CAACM,GAAG,CAAEF,eAAe,CAAE,CACnD,QAAQ,CAAEC,OAAQ,UAEjBJ,IAAI,EACI,CAErB,CAAC,IAAM,CACH,mBACI,KAAC,UAAU,EACP,IAAI,CAAC,QAAQ,CACb,OAAO,CAAC,WAAW,CACnB,SAAS,CAAEC,SAAU,CACrB,gBAAgB,CAAE,IAAK,CACvB,SAAS,CAAEH,UAAU,CAACC,MAAM,CAACM,GAAG,CAAEF,eAAe,CAAE,CACnD,QAAQ,CAAEC,OAAQ,UAEjBJ,IAAI,EACI,CAErB,CACJ,CAAC,CAED,cAAeJ,OAAM"},"metadata":{},"sourceType":"module"}